package org.apache.dubbo.demo.example.eg19;

import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.junit.Test;

public class ExtensionLoaderTest {

  @Test
  public void testGetExtensionLoader() {
    URL url = URL.valueOf("dubbo://192.168.0.101:20880?fruit.granter=apple");
    FruitGranter granter = ExtensionLoader.getExtensionLoader(FruitGranter.class)
        .getAdaptiveExtension();
    String result = granter.watering(url);
    System.out.println(result);
  }
}
